import 'package:acgn_pioneer/models/chapter_image_model.dart';
import 'package:acgn_pioneer/public.dart';

/// 阅读器事件
///

/// 开始执行
class ReaderRunEvent {
  ReaderRunEvent();
}

/// 头部详情加载结束（用来发送事件，更新slot详情实际高度）
class ReaderChapterDetailSlotEvent {
  Size size;
  ReaderChapterDetailSlotEvent(this.size);
}

/// 章节改变
class ReaderChapterIndexChangeEvent {
  ReaderChapterIndexChangeEvent();
}

/// 章节图片序号改变
class ReaderChapterImageIndexChangeEvent {
  ChapterImageModel img;
  ReaderChapterImageIndexChangeEvent(this.img);
}

/// 章节图片加载改变
class ReaderImageLoadEvent {
  ChapterImageModel model;
  ReaderImageLoadEvent(this.model);
}

/// 跳转章节至指定章节
class ReaderRedirectChapterIndexEvent {
  /// 章节id
  int chapterId;
  ReaderRedirectChapterIndexEvent(this.chapterId);
}

/// 关闭底部菜单
class ReaderCloseMenuEvent {
  /// 是否执行交叉动画
  bool isToggle;
  ReaderCloseMenuEvent(this.isToggle);
}

/// 评论点击切换事件
class ReaderCommentChangeEvent {
  /// 关联id
  int fatherId;
  String uName;
  ReaderCommentChangeEvent(this.fatherId, this.uName);
}

/// 添加评论事件
class ReaderCommentCommitEvent {
  ReaderCommentCommitEvent();
}

/// 改变弹幕速度
class ReaderCommentChangeSpeedEvent {
  double speed;
  ReaderCommentChangeSpeedEvent(this.speed);
}

/// 滚动中
class ReaderMoveEvent {
  double offset; // 滚动条滚动距离
  ReaderMoveEvent(this.offset);
}

/// 滚动结束
class ReaderMoveEndEvent {
  double offset; // 滚动条滚动距离
  ReaderMoveEndEvent(this.offset);
}
